home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / mailx6 / _setup.2 / Group3 / Custom.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-08-13  |  4.5 KB  |  155 lines

  1. VERSION 4.00
  2. Begin VB.Form Custom 
  3.    Caption         =   "Custom Address SAMPLE"
  4.    ClientHeight    =   3420
  5.    ClientLeft      =   1185
  6.    ClientTop       =   2100
  7.    ClientWidth     =   6885
  8.    Height          =   3795
  9.    Left            =   1140
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3420
  12.    ScaleWidth      =   6885
  13.    Top             =   1770
  14.    Width           =   6975
  15.    Begin VB.CommandButton Command2 
  16.       Caption         =   "Send Messages without UI && Custom Address"
  17.       Height          =   495
  18.       Left            =   360
  19.       TabIndex        =   7
  20.       Top             =   2640
  21.       Width           =   4455
  22.    End
  23.    Begin VB.TextBox szNoteText 
  24.       Height          =   375
  25.       Left            =   1200
  26.       TabIndex        =   6
  27.       Text            =   "The NotePart"
  28.       Top             =   2040
  29.       Width           =   5175
  30.    End
  31.    Begin VB.TextBox szSubject 
  32.       Height          =   375
  33.       Left            =   1200
  34.       TabIndex        =   4
  35.       Text            =   "The Subject"
  36.       Top             =   1440
  37.       Width           =   5175
  38.    End
  39.    Begin VB.TextBox szAddress 
  40.       Height          =   375
  41.       Left            =   1200
  42.       TabIndex        =   2
  43.       Text            =   "Joe@abc.com at Internet"
  44.       Top             =   840
  45.       Width           =   5175
  46.    End
  47.    Begin VB.CommandButton Command1 
  48.       Caption         =   "Login cc:Mail"
  49.       Height          =   375
  50.       Left            =   360
  51.       TabIndex        =   0
  52.       Top             =   240
  53.       Width           =   2175
  54.    End
  55.    Begin Mailx16Lib.MForm MForm1 
  56.       Left            =   1560
  57.       Top             =   3120
  58.       _Version        =   65542
  59.       _ExtentX        =   6165
  60.       _ExtentY        =   500
  61.       _StockProps     =   0
  62.       MXFormName      =   "FormTag1"
  63.    End
  64.    Begin Mailx16Lib.MSess MSess1 
  65.       Left            =   4920
  66.       Top             =   2520
  67.       _Version        =   65542
  68.       _ExtentX        =   900
  69.       _ExtentY        =   900
  70.       _StockProps     =   0
  71.       Mail_Type       =   2
  72.       DownLoadMsg     =   0   'False
  73.    End
  74.    Begin Mailx16Lib.MMsg MMsg1 
  75.       Left            =   5520
  76.       Top             =   2520
  77.       _Version        =   65542
  78.       _ExtentX        =   900
  79.       _ExtentY        =   900
  80.       _StockProps     =   0
  81.       DisplaySendDialog=   0   'False
  82.       BindString      =   "MSess1"
  83.    End
  84.    Begin Mailx16Lib.MReci MReci1 
  85.       Left            =   6120
  86.       Top             =   2520
  87.       _Version        =   65542
  88.       _ExtentX        =   900
  89.       _ExtentY        =   900
  90.       _StockProps     =   0
  91.       BindString      =   "MMsg1"
  92.    End
  93.    Begin VB.Label Label4 
  94.       Caption         =   "Enter a Recipient Address using the complete Format"
  95.       Height          =   495
  96.       Left            =   2640
  97.       TabIndex        =   8
  98.       Top             =   240
  99.       Width           =   3975
  100.    End
  101.    Begin VB.Label Label3 
  102.       Caption         =   "NoteText:"
  103.       Height          =   255
  104.       Left            =   360
  105.       TabIndex        =   5
  106.       Top             =   2160
  107.       Width           =   735
  108.    End
  109.    Begin VB.Label Label2 
  110.       Caption         =   "Subject:"
  111.       Height          =   255
  112.       Left            =   360
  113.       TabIndex        =   3
  114.       Top             =   1560
  115.       Width           =   735
  116.    End
  117.    Begin VB.Label Label1 
  118.       Caption         =   "Address:"
  119.       Height          =   255
  120.       Left            =   360
  121.       TabIndex        =   1
  122.       Top             =   960
  123.       Width           =   735
  124.    End
  125. Attribute VB_Name = "Custom"
  126. Attribute VB_Creatable = False
  127. Attribute VB_Exposed = False
  128. Option Explicit
  129. Private Sub Command1_Click()
  130.     MSess1.Logon = True
  131. End Sub
  132. Private Sub Command2_Click()
  133.     If MSess1.Logon = True Then
  134.         MReci1.Clear
  135.         MReci1.Action = 6
  136.         MReci1.RecipientAddress = szAddress.Text
  137.         MReci1.RecipientName = szAddress.Text
  138.         MMsg1.Action = ACTION_NEW
  139.         MMsg1.WorkingMsg = COMPOSE_MSG
  140.         MReci1.Refresh
  141.         MMsg1.Subject = szSubject
  142.         MMsg1.NoteText = szNoteText
  143.             
  144.         MMsg1.Action = ACTION_SENDMSG
  145.             
  146.         If MMsg1.ErrorNum = 0 Then
  147.             MsgBox "Message has been sent"
  148.         Else
  149.             MsgBox "Error Sending The Mail message"
  150.         End If
  151.     Else
  152.         MsgBox "No Active Session available"
  153.     End If
  154. End Sub
  155.